const state = {
  selectOptions: null,
  selectCustomer: null,
  selectBrand: null
}

const mutations = {
  SET_SELECT_OPTIONS: (state, data) => {
    state.selectOptions = data
  },
  SET_SELECT_CUSTOMER: (state, data) => {
    state.selectCustomer = data
  },
  SET_SELECT_BRAND: (state, data) => {
    state.selectBrand = data
  },
  SET_EMPTY: (state, data) => {
    state.selectOptions = data
    state.selectCustomer = data
    state.selectBrand = data
  }
}

const actions = {
  setSelectOptions({ commit }, data) {
    commit('SET_SELECT_OPTIONS', data)
  },
  setSelectCustomer: ({ commit }, data) => {
    commit('SET_SELECT_CUSTOMER', data)
  },
  setSelectBrand: ({ commit }, data) => {
    commit('SET_SELECT_BRAND', data)
  },
  setEmpty({ commit }, targetUser) {
    commit('SET_EMPTY', targetUser)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
